package com.xczz.model;

import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@Table(name = "sys_role_menu", schema = "ws")
@IdClass(SysRoleMenu.SysRoleMenuEntityPK.class)
public class SysRoleMenu {

    @Id
    @Column(name = "role_id", nullable = false)
    private Long roleId;

    @Id
    @Column(name = "menu_id", nullable = false)
    private Long menuId;

    // 复合主键类
    @Data
    public static class SysRoleMenuEntityPK implements Serializable {
        private Long roleId;
        private Long menuId;
    }
}